import { createWebHashHistory, createRouter } from 'vue-router'


const routes = [
  {
    path: '/',
    component: () => import('../views/LoginView.vue')
  },
  {
    path: '/home',
    component: () => import('../views/HomeView.vue'),
    children:[
      {
        path: 'user',
        component: () => import('../components/user/UserList.vue')
      },
      {
        path: 'role',
        component: () => import('../components/role/RoleList.vue')
      },
      {
        path: 'menu',
        component: () => import('../components/menu/MenuList.vue')
      },
      {
        path: 'dept',
        component: () => import('../components/dept/DeptList.vue')
      },
    ]
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router